<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class GaleriaModel extends CI_Model
{   
    public function montarGaleria($limit = NULL)
    {   if($limit != NULL)
        {  $this->db->limit($limit);
           $this->db->order_by('codigo_galeria', 'DESC');
        }
        return $this->db->get('GALERIA');    
    }
    
    public function buscaFotoGaleria($idGaleria)
    {        $this->db->where('galeria',$idGaleria);
             return $this->db->get('FOTO_GALERIA');        
    }
}
